/**
 * Copyright (c) 2018 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有，侵权必究！
 */

package com.evaluationSystem.entity.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 用户管理
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0
 */
@Data
public class SysUserDTO implements Serializable {
    private static final long serialVersionUID = 1L;

//	@Null(message="{id.null}")
	@NotNull(message="{id.require}")
	private Long id;

	@NotBlank(message="{sysuser.username.require}")
	private String username;

	@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
//	@NotBlank(message="{sysuser.password.require}")
	private String password;

	private String password2;

	@NotBlank(message="{sysuser.realname.require}")
	private String realName;

	@NotBlank(message="{sysuser.workNo.require}")
	private String workNo;

	private String headUrl;

	@NotNull(message = "{sysuser.gender.range}")
	private Integer gender;

	@Email(message="{sysuser.email.error}")
	private String email;

	private String mobile;

	@NotNull(message="{sysuser.deptId.require}")
	private Long deptId;

	@NotNull(message = "{sysuser.status.range}")
	private Integer status;

	@JsonProperty(access = JsonProperty.Access.READ_ONLY)
	private Date createDate;

	@JsonProperty(access = JsonProperty.Access.READ_ONLY)
	private Integer superAdmin;

	private List<Long> roleIdList;

	private String deptName;

}